package com.songlanyun.modules.message.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.enums.OpusConstant;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.message.entity.PrivateMessage;
import com.songlanyun.modules.message.model.to.PrivateMessageTO;
import com.songlanyun.modules.message.model.vo.PrivateMessageVO;
import com.songlanyun.modules.message.model.vo.UnreadMessageVO;

import java.util.List;
import java.util.Map;

/**
 * app站内消息
 *
 * @author wuchao
 * @email sunlightcs@gmail.com
 * @date 2021-03-04 16:05:09
 */
public interface PrivateMessageService extends IService<PrivateMessage> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 保存站内消息
     */
    void saveMessage(PrivateMessageTO privateMessageTO);

    Integer unreadNum(Long userId);

    List<UnreadMessageVO> unreadInfo(Long userId);

    void readType(Integer type, Long userId);

    PrivateMessageVO info(Long id);

    PrivateMessage getById(Long id, Boolean isThrow);

    PageUtils listType(Map<String, Object> params);
}

